from django.apps import AppConfig


class ApiManagerConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'api_manager'
    verbose_name = 'API测试平台'

    def ready(self):
        # 确保 TestExecution 不会被自动注册到 admin
        from django.contrib import admin
        from .models import TestExecution
        
        # 如果 TestExecution 已经注册，就取消注册
        try:
            admin.site.unregister(TestExecution)
        except admin.sites.NotRegistered:
            pass
